import _axios from '@/tool/http.js'

// 货物预约来源
export const getResource = () => {
    let options = {
        url: api.base + '/systemDictionary/getByType/reservationSource',
        method: 'POST',
        headers: {
            "Content-Type": 'application/json', "Accept": 'application/json'
        }
    }
    return _axios(options);
}
// 获取预约客户的列表
export const getPendingOrders = (obj) => {
    let options = {
        url: api.crm + '/reservationInfo/list',
        method: 'POST',
        data: JSON.stringify(obj),
        headers: {
            "Content-Type": 'application/json', "Accept": 'application/json'
        }
    }
    return _axios(options)
}
// 获取计划购买时间
export const getPlanTime = () => {
    let options = {
        url: api.base + '/systemDictionary/getByType/planBuyTime',
        method: 'POST',
        headers: {
            "Content-Type": 'application/json', "Accept": 'application/json'
        }
    }
    return _axios(options);
}
// 编辑预约
export const modifyOrder = (param) => {
    let options = {
        url: api.crm + '/reservationInfo/edit',
        method: 'POST',
        data: JSON.stringify(param),
        headers: {
            "Content-Type": 'application/json', "Accept": 'application/json'
        }
    }
    return _axios(options)
}